by using with_stderr_contains because
parallel build may mix up the lines.
Additionally, remove the last line of
the benchmark.
execs().with_status(0)
.with_stdout_contains("\
running 1 test
-test bar ... bench: 0 ns/iter (+/- 0)
-
-test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured"));
+test bar ... bench: 0 ns/iter (+/- 0)"));
}
#[test]
.arg("--exclude")
.arg("baz"),
execs().with_status(0)
- .with_stderr("[..] Compiling bar v0.1.0 ([..])\n\
- [..] Compiling foo v0.1.0 ([..])\n\
- [..] Finished dev [unoptimized + debuginfo] target(s) in [..]\n"));
+ .with_stderr_contains("[..]Compiling foo v0.1.0 [..]")
+ .with_stderr_contains("[..]Compiling bar v0.1.0 [..]")
+ .with_stderr_does_not_contain("[..]Compiling baz v0.1.0 [..]"));
}
#[test]
.arg("baz"),
execs().with_status(0)
.with_stdout_contains("running 1 test
-test bar ... ok
-
-test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured"));
+test bar ... ok"));
}
#[test]